# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-ruby-termios
_pkgname=ruby-termios
pkgver=1.1.0
pkgrel=7
pkgdesc='A simple wrapper of termios(3).'
arch=('x86_64' 'aarch64')
url='https://rubygems.org/gems/ruby-termios'
license=('custom:unknown')
depends=('ruby')
makedepends=('rubygems' 'ruby-rdoc')
options=(!emptydirs)
source=("https://rubygems.org/downloads/$_pkgname-$pkgver.gem")
noextract=("$_pkgname-$pkgver.gem")
sha512sums=('dc98e6d7e304fa76b4139dd88f8c6955e6f4e09ca48d5611813fac941564c93165945c24dc0d7f7f84d7cd959512d006d73f042b57fcb1dde2743ffbb3cc9b41')

package() {
  _gemdir="$(ruby -e'puts Gem.default_dir')"

  gem install --ignore-dependencies --no-user-install \
    -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" "$_pkgname-$pkgver.gem"

  rm "$pkgdir/$_gemdir/cache/$_pkgname-$pkgver.gem"
}

